package com.app.service.impl;

import com.app.dao.DevAppMapper;
import com.app.dao.DevMapper;
import com.app.entity.AppInfo;
import com.app.entity.DataDictionary;
import com.app.entity.bean.AppInfoCondition;
import com.app.entity.bean.Page;
import com.app.service.DevInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DevInfoServiceImpl implements DevInfoService {
    @Autowired
    private DevAppMapper devAppMapper;
@Autowired
private DevMapper devMapper;
    @Override
    public Page<AppInfo> getPageApp(AppInfoCondition condition) {
        int appCount = devAppMapper.getcountById(condition);
        List<AppInfo> appList = devAppMapper.getAppInfoList(condition);
        Page<AppInfo> aPage = new Page<>(condition.getPageIndex(),condition.getLimitCount(),appCount,appList);
        return aPage;
    }

    @Override
    public List<DataDictionary> getDataTypeCode() {
        return devAppMapper.findAppStatus();
    }


}
